<template>
  <div>
    <h2>下拉菜单组件</h2>
    <!-- 组件名:el-dropdown
             默认插槽：默认显示的内容
             具名插槽：dropdown:用于显示下拉 菜单的内容
                el-dropdown-menu
                   el-ddropdown-item
         点击事件
             el-dropdown-item   command="标识"
             el-dropdown  @command="(command)=>{command:点击项的标识}"

     需求： 选择区域：广东省，广西省，湖南省
   -->
    <el-dropdown @command="commandEvent">
      <span>选择区域</span>
      <template #dropdown>
        <el-dropdown-menu>
          <el-dropdown-item command="a">广东省</el-dropdown-item>
          <el-dropdown-item command="b">广西省</el-dropdown-item>
          <el-dropdown-item command="c">湖南省</el-dropdown-item>
        </el-dropdown-menu>
      </template>
    </el-dropdown>
  </div>
</template>
<script>
export default {
  methods: {
    commandEvent(command) {
      console.log(command)
    }
  }
}
</script>
<style></style>
